Skip to content

Conversation

@BhaskarKulshrestha
Copy link
Collaborator

Summary

Introduces a multi-language pull request CI workflow (.github/workflows/pr-ci.yml) that conditionally validates template changes (Node, Python/FastAPI, Go, Spring Boot, Next.js) in parallel. Provides early failure signals for broken templates. Closes #.

Type of Change

  • Feature
  • CI / Build
  • Bug fix
  • Chore / Refactor
  • Docs
  • Tests
  • Other

Motivation / Context

Template regressions were only discoverable post-merge or via manual review. Adding a targeted, path-aware CI workflow reduces reviewer burden, shortens feedback cycles, and preserves confidence that shipped scaffolds actually work across supported languages.

Approach

Implemented a GitHub Actions workflow triggered on pull_request events to main. A first "changes" job uses dorny/paths-filter to detect which of the template families changed and conditionally runs downstream jobs only for those stacks. Each language job installs dependencies (where relevant), performs a lightweight build or startup & health probe (smoke test), and reports status to a final summary job that enforces failure aggregation. Concurrency control cancels superseded runs for the same PR. Chosen over a monolithic matrix because different ecosystems need bespoke steps and skipping untouched stacks saves time.

CLI Impact

No direct CLI surface changes (no new flags, commands, or behavior). Purely repository CI automation.

# before
# (No PR template CI validation for templates)

# after
# PRs to main now run per-template validation automatically.

Generated Output Impact

None. Scaffolded output structure and templates remain unchanged; only repository automation added. No new template folders or Docker/compose mutations.

Tests

No new automated tests added (workflow itself executes smoke probes). Rationale: templates currently lack formal unit/integration test suites; this CI lays groundwork so future test files are picked up easily.

  • Added new test(s)
  • Updated existing test(s)
  • Manually smoke-tested locally (running individual template start commands)
  • No tests needed (initial infra layer; adds value via runtime smoke)

Local scaffold smoke (example):

node bin/index.js demo --services node --no-install --yes

Result: ✅ (template copied & dev script available)

Screenshots / Logs (Optional)

Example (abridged) successful job sequence:

changes  -> success (detected: python)
python   -> success
node     -> skipped
frontend -> skipped
go       -> skipped
java     -> skipped
summary  -> success

Docs

  • Added guide file docs/guide/pr-ci.md
  • Updated README.md (not required for now)
  • Updated .github/copilot-instructions.md
  • Not applicable

Checklist

  • Code follows existing repo conventions (YAML style, minimal dependencies)
  • No large assets added
  • Default ports respected in smoke checks (3001 Node, 3002 Go, 3004 Python)
  • Concurrency group defined to prevent redundant runs
  • Jobs conditionally execute only when related paths change
  • Java build skips tests intentionally (none present) to keep pipeline fast
  • Summary job aggregates results and fails when any job fails

Open Questions / Follow-ups

  1. Add root CLI test job (npm ci && npm test) for non-template changes.
  2. Introduce ESLint/Prettier configs and real lint steps for Node & frontend templates.
  3. Add minimal tests per template (Go _test.go, Python pytest, Node vitest, Java JUnit) and enable them.
  4. Consider Docker build + compose smoke integration.
  5. Add security scanning (CodeQL, dependency audit) in separate workflow.
  6. Add coverage reporting once tests exist.
  7. Provide caching improvements for Go (actions/setup-go with caching) if runtime length increases.

Thanks for contributing! 🎉

@kaifcoder kaifcoder merged commit dfe6e94 into kaifcoder:main Oct 5, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants